const mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate'); //分页插件

var schema = new mongoose.Schema({ cateId: mongoose.Schema.ObjectId, type: String, name: String, price: Number, color: String, size: String, date: Date, safety: String, UE: String, operative: String, quality: Boolean }); //schema 模型 
schema.plugin(mongoosePaginate); //分页的插件

var user = mongoose.model('product', schema); // Model.paginate()


module.exports = user;
// ,date:Date,safety:String,UE:String,operative:String,quality:Boolean